package top.yxqz.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: 余小小
 * @date: 2023/10/24
 * @description：控制层
 */
@Controller
public class LoginController {
    /**
     * 和SPringMVC一样
     * @return
     * SpringMVC推荐使用model来存储数据-----request类似
     */
    @RequestMapping("login")
    public String login(Model model) {
        model.addAttribute("currentYear",2023);
        return "login";
    }
}
